package population.populationFindPredicates;

import character.Character;
import character.race.Race;

/**
 * Find all characters looking for love.
 * @author pcdejager
 */
public class FindLookingForLove implements PopulationFindPredicate {
    /**
     * The check method.
     * @param c The character to check
     * @return True if correct gender, else false
     */
    public final boolean check(final Character c) {
        if (c.getSocialLinks().getLoveInterest() != null) {
            return false;
        }
        Race r = c.getRace();
        int startAge = r.getPartner().getPartnerStartAge();
        if (c.getAge().years() >= startAge) {
            return true;
        }
        return false;
    }
}
